From: Giovanni Campagna Date: Sat, 8 Jun 2013 13:24:20 +0000 (+0200) Subject: network: don't fail if we can't read a connection associated with an active X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4035 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=013b6aa44ae7a2791c7aaa1eb8844cb961fc2470;p=gnome-shell.git network: don't fail if we can't read a connection associated with an active It can happen in legitimate cases, such as a version incompatibility between NetworkManager and libnm-glib or a restricted permission. https://bugzilla.gnome.org/show_bug.cgi?id=701849 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 747b5a0b0..923aaeaf4 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1711,8 +1711,12 @@ const NMApplet = new Lang.Class({ // Ignore slave connections let connectionPath = activeConnections[i].connection; - let connection = this._settings.get_connection_by_path(connectionPath) - if (this._ignoreConnection(connection)) + let connection = this._settings.get_connection_by_path(connectionPath); + + // connection might be null, if libnm-glib fails to create + // the object due to version incompatibility, or if the + // connection is not visible to the current user + if (connection && this._ignoreConnection(connection)) continue; supportedConnections.push(activeConnections[i]);